#!/bin/sh

set -eu

jiapkg_build() {
	cmake \
		-DCMAKE_INSTALL_PREFIX="$JIAPKG_INSTALL_DIR" \
		-DCMAKE_BUILD_TYPE=Release -Bbuild
}

jiapkg_install() {
	cmake --install build
}

case "$1" in
build) jiapkg_build ;;
install) jiapkg_install ;;
esac
